--精神摧毁
local jingshencuihui = fk.CreateSkill {
    name = "mcdh_jingshencuihui",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

jingshencuihui:addEffect(fk.TargetSpecified,{
    can_trigger = function(self, event, target, player, data)
        local room = player.room
        return player:hasSkill(self) and target == player and data.card.trueName == "slash" and not player:isNude() and data:isOnlyTarget(data.to)
                and not data.to:isNude()
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        local to = data.to
        room:askForDiscard(player, 1, 1, true, self.name, false, ".", "#jingshencuihui-discard")
        local card = room:askForCardChosen(player, to, "he", self.name,"#jingshencuihui_other-discard:"..data.to.id)
        room:throwCard({card}, self.name, to, player)
        room:addPlayerMark(to, "@@jingshencuihui-turn")
        room:addPlayerMark(to, MarkEnum.UncompulsoryInvalidity .. "-turn")
    end
})

Fk:loadTranslationTable {
    ["mcdh_jingshencuihui"] = "精神摧毁",
    ["#jingshencuihui-discard"] = "精神摧毁:弃置一张牌",
    ["#jingshencuihui_other-discard"] = "精神摧毁:弃置 %src 一张牌",
    ["@@jingshencuihui-turn"] = "精神摧毁",
    [":mcdh_jingshencuihui"] = "当你使用【杀】指定唯一目标后，你可以弃置你与其各一张牌，然后其本回合非锁定技失效。",
}

return jingshencuihui